Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated to latest algebra #994

Merged
merged 1 commit into from
Apr 26, 2016
Merged

Conversation

kailuowang
Copy link
Contributor

No description provided.

@non
Copy link
Contributor

non commented Apr 24, 2016

This PR looks fine to me. 👍 if we can get Travis to pass (not sure why it failed)

@kailuowang
Copy link
Contributor Author

kailuowang commented Apr 24, 2016

@non looks like that https://codecov.io/bash is down, causing the second part of the following command to fail

$sbt_cmd coverage validateJVM coverageReport && bash <(curl -s https://codecov.io/bash)"

update: turns out codecov is taking a maintenance break. http://status.codecov.io/

@non
Copy link
Contributor

non commented Apr 24, 2016

OK, great. We can just hang out and wait for that to finish. Thanks for investigating!

@kailuowang
Copy link
Contributor Author

Looks like codecov is back online. Can we restart the build?

@non
Copy link
Contributor

non commented Apr 24, 2016

Yeah let's try it again.

@kailuowang
Copy link
Contributor Author

Looks like that this time it failed on (or after) uploading coverage report to S3. Maybe codecov is still having issues.

def eqv(x: (A, B), y: (A, B)): Boolean =
A.eqv(x._1, y._1) && B.eqv(x._2, y._2)
}
implicit def tuple2Eq[A, B](implicit A: Eq[A], B: Eq[B]): Eq[(A, B)] = tuple.tuple2Eq
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should be able to just remove these right? And do the correct import at the places that use this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I admit I was too lazy. Just updated.

@adelbertc
Copy link
Contributor

Can you also add extend the appropriate tuple instances trait like we do /~https://github.com/typelevel/cats/blob/master/core/src/main/scala/cats/std/anyval.scala#L18 so users only need 1 import?

@kailuowang
Copy link
Contributor Author

@adelbertc IRT your last comment about adding the algebra tuple to cats.std, the bad news is that the generated algebra.std.TupleInstances is package private. Do you want to open it up and release algebra 0.4.1 or shall we have this wait for the next cats release?

@non
Copy link
Contributor

non commented Apr 24, 2016

@kailuowang let's open that up -- we just released 0.4.0 and i think that is pretty important

@kailuowang
Copy link
Contributor Author

kailuowang commented Apr 24, 2016

@non makes sense. I will send in a PR to algebra soon.

@adelbertc
Copy link
Contributor

typelevel/algebra#151

@ceedubs
Copy link
Contributor

ceedubs commented Apr 25, 2016

The build issues should be fixed. I'm going to try to close and reopen this to see if it makes Travis CI happy.

@ceedubs ceedubs closed this Apr 25, 2016
@ceedubs ceedubs reopened this Apr 25, 2016
@kailuowang
Copy link
Contributor Author

Don't merge yet, waiting on a new algebra release so we can address @adelbertc's last comment

@ceedubs
Copy link
Contributor

ceedubs commented Apr 25, 2016

Do we have an issue with scala.js versions of algebra? https://travis-ci.org/typelevel/cats/jobs/125562475#L3310-L3313

@kailuowang kailuowang changed the title updated to Algebra 0.4.0 updated to latest algebra Apr 25, 2016
@kailuowang kailuowang force-pushed the update-algebra branch 3 times, most recently from ffe0c64 to 8bbdd48 Compare April 25, 2016 17:14
@kailuowang
Copy link
Contributor Author

@ceedubs, that's due to the fact that I forgot to update the algebra.law version down in the build.sbt. just pushed in a fix.

@non
Copy link
Contributor

non commented Apr 25, 2016

Looks good to me. 👍

@@ -5,6 +5,7 @@ import cats.laws.discipline.{CartesianTests, MonadStateTests, SerializableTests}
import cats.data.{State, StateT}
import cats.laws.discipline.eq._
import cats.laws.discipline.arbitrary._
import cats.std.tuple._
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?

@adelbertc
Copy link
Contributor

adelbertc commented Apr 25, 2016

👍 from me, modulo 2 nitpicky comments

// on an algebra release that includes /~https://github.com/non/algebra/pull/82
implicit def writerTIdEq[L, V](implicit E: Eq[(L, V)]): Eq[WriterT[Id, L, V]] =
implicit def writerTIdEq[L: Eq, V: Eq]: Eq[WriterT[Id, L, V]] = {
import algebra.std.tuple.tuple2Eq
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this up top with the rest of the imports?

@kailuowang
Copy link
Contributor Author

@adelbertc's comments addressed.

@@ -60,23 +60,9 @@ l.foldMap(i => i.toString)
```

To use this
with a function that produces a tuple, we can define a `Monoid` for a tuple
with a function that produces a tuple, cats also provides a `Monoid` for a tuple
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this potentially confusing since these actually come from Algebra and the following sentence goes into detail about the role Algebra plays here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I used cats here because it is available through cats.std. and I didn't notice the sentence below. I will add the detail about the instance below as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update: N.B. added below. Please help review the wording.

@codecov-io
Copy link

Current coverage is 83.76%

Merging #994 into master will decrease coverage by -0.00%

@@             master       #994   diff @@
==========================================
  Files           368        368          
  Lines          2367       2365     -2   
  Methods        2162       2157     -5   
  Messages          0          0          
  Branches         16         20     +4   
==========================================
- Hits           1983       1981     -2   
  Misses          384        384          
  Partials          0          0          
  1. 4 files (not in diff) in .../main/scala/cats/std were modified. more
  2. 2 files (not in diff) in ...n/scala/cats/functor were modified. more
  3. 2 files (not in diff) in ...main/scala/cats/data were modified. more
    • Hits +2
  4. 11 files (not in diff) in ...cats/laws/discipline were modified. more
  5. 25 files (not in diff) in ...in/scala/cats/syntax were modified. more
  6. 7 files (not in diff) in .../main/scala/cats/std were modified. more
  7. 3 files (not in diff) in ...n/scala/cats/functor were modified. more
  8. 3 files (not in diff) in ...main/scala/cats/free were modified. more
  9. 2 files (not in diff) in ...main/scala/cats/data were modified. more
  10. 1 files (not in diff) in .../src/main/scala/cats were modified. more

Sunburst

Powered by Codecov. Last updated by 7cdbd34

@adelbertc
Copy link
Contributor

adelbertc commented Apr 25, 2016

👍 - if @travisbrown is OK with the comment changes let's merge

@ceedubs
Copy link
Contributor

ceedubs commented Apr 26, 2016

👍 the clarification about algebra tuple instances looks good to me. I'm going to go ahead and merge. @travisbrown if you have suggestions for further improvements it should be easy for us to make a doc update after merging this.

@ceedubs ceedubs merged commit b679435 into typelevel:master Apr 26, 2016
@kailuowang kailuowang deleted the update-algebra branch April 26, 2016 11:48
@travisbrown
Copy link
Contributor

Sorry for the delay, but yes, +1 from me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants